﻿#pragma once


// CDataProductPropertyDdialog 对话框

class CDataProductPropertyDdialog : public CDialogEx
{
	DECLARE_DYNAMIC(CDataProductPropertyDdialog)

public:
	CDataProductPropertyDdialog(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CDataProductPropertyDdialog();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_DATA_PRODUCT_PROPERTY };
#endif

protected:
	ck::DataProductInfo*	m_pProduct;
	ck::data::Schema*	m_pSchema;

protected:
	void	Populate(ck::data::Schema* pSchema);
	void	Populate(ck::data::Group* pGroup, CMFCPropertyGridProperty* pxGroup);
	void	Populate(ck::data::Field* pField, CMFCPropertyGridProperty* pxField);

public:
	void	SetProduct(ck::DataProductInfo* pProduct);


protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	CMFCPropertyGridCtrl m_props;
};
